package com.google.hackathon.game.shriko.core;

import playn.core.Game;

public class Shriko implements Game {
  private static State render = null;

  @Override
  public void init() {
    setRender(new Title());
  }

  @Override
  public void paint(float delta) {
    render.paint(delta);
  }

  @Override
  public void update(float delta) {
    render.update(delta);
    if (render.hasNextState()) {
      render = render.nextState();
    }
  }

  @Override
  public int updateRate() {
    return 25;
  }

  public static void setRender(State render) {
    Shriko.render = render;
  }
}
